Repository navigation
Conversation
WordPress 7.2 checks the global blockGap with wp_sanitize_block_gap_value()
before using it to size responsive grid columns. The check rejects any
value containing "(" unless it is a single var(--name). Our fluid
max(calc(clamp())) gap failed it, so core sized grid columns against a
0.5em fallback while the gap it draws stayed about 32px. Grids that set
both a column count and a minimum column width then lost a column from
1024px up: three pricing cards became two plus one, two stats became one.
The same formula now lives in settings.custom.block-gap, and blockGap
points at it. A bare var() passes the check, and the gap keeps its exact
value. 7.1 renders the same as before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WordPress 7.2 knocks a column off some grids on desktop. A row of three pricing cards becomes two, with the third card alone on a new row, and a two-up stats grid stacks into one column. The cause is a new check in 7.2 that rejects the formula our theme uses for the default space between blocks. When the check fails, WordPress works out column widths with a much smaller gap than the one it actually draws, so the last column no longer fits.
This moves the same formula into a custom property and points the block gap at it. That form passes the new check, and the gap stays exactly the same size. On 7.2 the grids now look identical to 7.1, and 7.1 doesn't change.
Screenshots
1. Pricing cards on WordPress 7.2, before

2. Pricing cards on WordPress 7.2, with this fix (same as 7.1)

3. Stats grid on WordPress 7.2, before

4. Stats grid on WordPress 7.2, with this fix (same as 7.1)
